<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="common.js"></script>
</head>
<body>
    
    <script> 
    var a=new String("AaBbCcDdFfGg");
    function change(a){
        var a1=[];
        for(var i=0;i<a.length;i++){
          var charcode=a.charCodeAt(i)
          if(smallcode.indexOf(charcode)!=-1){
              var newcharcode=charcode-32;
            //   console.log(a.charAt(i),String.fromCharCode(newcharcode))
            a1[i]=String.fromCharCode(newcharcode)
          }
          else{
            a1[i]=a.charAt(i);
          }   
        }
        return a1.join("")
    }
    console.log(change(a))
    </script>
</body>
</html>